This invention relates to devices for crushing or flattening and storing empty containers, such as beverage cans made from metal or other crushable material, and is in the nature of an improvement on the apparatus disclosed in my prior U.S. Pat. Nos. 3,792,765 and 3,857,334. In the crushing or flattening of containers for shipment to the place of recycling the material thereof, it is desirable that the crushed containers be sorted as to materials, and that such sorting be done automatically during the operation of the apparatus, to minimize handling or sorting operations in connection with the salvage of material. It is also important that containers filled with liquid or other material, or other foreign objects, be excluded from the crushing apparatus, to avoid damage to the apparatus. Also, for the purpose of keeping a proper record of containers passing through the apparatus and crushed therein, it is desirable that each container be counted regardless of its size, within the size capabilities of the machine.